<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('修改借阅')" />
</head>
<body class="white-bg">
	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
		<form class="form-horizontal m" id="form-library-edit" th:object="${libraryborrow}">
		    <input name="typeId" type="hidden"  th:field="*{borrowId}" />
			<div class="form-group">
				<label class="col-sm-3 control-label">图书名称：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="bookname" id="bookname" th:field="*{libraryBook.name}" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">图书类型：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="tyname" id="tyname" th:field="*{libraryType.tyname}" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">借阅人：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="userName" id="userName" th:field="*{user.userName}" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">班级：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="deptName" id="deptName" th:field="*{dept.deptName}" required>
				</div>
			</div>

			<div class="form-group">
				<label class="col-sm-3 control-label">还书状态：</label>
				<div class="col-sm-8">
					<select class="form-control" name="backType">
						<option value="0" th:selected="${libraryborrow.backType} eq 0">正常还书</option>
						<option value="1" th:selected="${libraryborrow.backType} eq 1">破损还书</option>
						<option value="2" th:selected="${libraryborrow.backType} eq 2">丢失图书</option>
						<option value="3" th:selected="${libraryborrow.backType} eq 3">延迟还书</option>
						<option value="4" th:selected="${libraryborrow.backType} eq 4">尚未归还</option>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">备注：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="exceptRemarks" id="exceptRemarks" th:field="*{exceptRemarks}" required>
				</div>
			</div>
		</form>
	</div>
	<th:block th:include="include :: footer" />
	<script type="text/javascript">
		var prefix = ctx + "admin/library/borrow";

		function submitHandler() {
	        if ($.validate.form()) {
	        	$.operate.save(prefix + "/edit", $('#form-library-edit').serialize());
	        }
	    }
	</script>
</body>
</html>
